package featuremodel.method;

import skyblue.Method;
import skyblue.SkyBlueDef;
import skyblue.Variable;
import featuremodel.FeatureRep;

public class SetUndefineMethod extends Method {

	private Variable a;

	public SetUndefineMethod(Variable a) {
		
		this.a = a;
		
		getOutputs().add(a);
	
	}

	public void setTobeMethodType() {

		a.setTobemethodtype(SkyBlueDef.METHOD_TYPE_UNDECIDE);
	}

	public void clearTobeMethodType() {
		a.setTobemethodtype(null);
	}

	public void setTobeMethodType2() {

		a.setTobeMethodType2(SkyBlueDef.METHOD_TYPE_UNDECIDE);
	}

	public void clearTobeMethodType2() {
		a.setTobeMethodType2(null);
	}

	public void execute() {

		FeatureRep fp = (FeatureRep) a.getValue().getValuerep();
		fp.setBindState(SkyBlueDef.VARIABLE_UNDECIDED);
		a.setMethodtype(SkyBlueDef.METHOD_TYPE_UNDECIDE);
		a.setTobemethodtype(null);
	}

}
